
var ue = UE.getEditor('container',{
    toolbars: [[
        'fullscreen', 'source', '|', 'undo', 'redo', '|',
        'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
        'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
        'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
        'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
        'simpleupload', 'insertimage',
    ]
    ]
});
/*返回菜单列表*/
$("#adtvmout").click(function () {
    var page = $("input[name='page']").val();
    window.location.href = '/admin/Message/systemIndex?page=' + page;
});

$(document).on('click', '#alone', function(){
    $('#choose').show();
})
$(document).on('click', '#all', function(){
    $('#choose').hide();
    $('#choose1').hide();
})
/*修改*/
$("#adtvmadd").click(function () {
    // var data = $("#adtvminfo").serialize();
    var data = new FormData($("#adtvminfo" )[0]);

    var id = $("input[name='id']").val();
    $.ajax({
        url: '/admin/Message/systemUpdate',
        type: 'POST',
        data: data,
        dataType: 'JSON',
        async: false,
        cache: false,
        contentType: false,
        processData: false,
        success: function (json) {
            if (json.code == 2000) {
                if (id != '') {
                    history.back(-1);
                } else {
                    var page = $("input[name='page']").val();
                    window.location.href = '/admin/Message/systemIndex?page=' + page
                }
            } else {
                dshow(json.message);
            }
        }
    });
});
/**
 * 下拉选择
 */
$(function(){
    $('#n_user_id').searchableSelect();
});


